package com.neo.impatient.C02_flowControl.C02_10_process

object processTest {


  /**
    * 没有返回值的函数称为过程，我们需要他的副作用
    * @param s
    */
  def box(s: String) {
    var border  = "_" * s.length +  "--\n"
    println(border + "|" + s + "|\n" + border)
  }


  /**
    * 过程也可以显式申明返回值为Uilt,
    * @param s
    */
  def box1(s: String): Unit = {
    var border  = "_" * s.length +  "--\n"
    println(border + "|" + s + "|\n" + border)
  }

  def main(args: Array[String]): Unit = {
    box("asdfasd")

    box1("aaaa")
  }


}
